package diwuzhou;

public class Studentmain {
    public static void main(String[] args) {
        Student[] students=new Student[3];
        students[0]=new Student("202011101","jack",98,88);
        students[1]=new Student("202011102","tom",83,95);
        students[2]=new Student("202011103","lucky",92,78);
        System.out.println("当前创建对象个数"+Student.count);
        int fenshu=0;
        Student tmp=new Student();
        for(int i=0;i<3;i++)
        {
            System.out.println(students[i]);
            if(students[i].getMath()+ students[i].getChinese()>fenshu){
                fenshu=students[i].getMath()+students[i].getChinese();
                tmp=students[i];
            }
        }
//
        System.out.println("总分最高是:"+tmp.getSno()+","
                +tmp.getSname()+","+(tmp.getMath()+ tmp.chinese));

    }
}
